package com.zyx.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class SpencerExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SpencerExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andSpencerIdIsNull() {
            addCriterion("spencerId is null");
            return (Criteria) this;
        }

        public Criteria andSpencerIdIsNotNull() {
            addCriterion("spencerId is not null");
            return (Criteria) this;
        }

        public Criteria andSpencerIdEqualTo(Integer value) {
            addCriterion("spencerId =", value, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdNotEqualTo(Integer value) {
            addCriterion("spencerId <>", value, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdGreaterThan(Integer value) {
            addCriterion("spencerId >", value, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("spencerId >=", value, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdLessThan(Integer value) {
            addCriterion("spencerId <", value, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdLessThanOrEqualTo(Integer value) {
            addCriterion("spencerId <=", value, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdIn(List<Integer> values) {
            addCriterion("spencerId in", values, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdNotIn(List<Integer> values) {
            addCriterion("spencerId not in", values, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdBetween(Integer value1, Integer value2) {
            addCriterion("spencerId between", value1, value2, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerIdNotBetween(Integer value1, Integer value2) {
            addCriterion("spencerId not between", value1, value2, "spencerId");
            return (Criteria) this;
        }

        public Criteria andSpencerUserIsNull() {
            addCriterion("spencerUser is null");
            return (Criteria) this;
        }

        public Criteria andSpencerUserIsNotNull() {
            addCriterion("spencerUser is not null");
            return (Criteria) this;
        }

        public Criteria andSpencerUserEqualTo(String value) {
            addCriterion("spencerUser =", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserNotEqualTo(String value) {
            addCriterion("spencerUser <>", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserGreaterThan(String value) {
            addCriterion("spencerUser >", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserGreaterThanOrEqualTo(String value) {
            addCriterion("spencerUser >=", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserLessThan(String value) {
            addCriterion("spencerUser <", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserLessThanOrEqualTo(String value) {
            addCriterion("spencerUser <=", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserLike(String value) {
            addCriterion("spencerUser like", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserNotLike(String value) {
            addCriterion("spencerUser not like", value, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserIn(List<String> values) {
            addCriterion("spencerUser in", values, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserNotIn(List<String> values) {
            addCriterion("spencerUser not in", values, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserBetween(String value1, String value2) {
            addCriterion("spencerUser between", value1, value2, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerUserNotBetween(String value1, String value2) {
            addCriterion("spencerUser not between", value1, value2, "spencerUser");
            return (Criteria) this;
        }

        public Criteria andSpencerWordIsNull() {
            addCriterion("spencerWord is null");
            return (Criteria) this;
        }

        public Criteria andSpencerWordIsNotNull() {
            addCriterion("spencerWord is not null");
            return (Criteria) this;
        }

        public Criteria andSpencerWordEqualTo(String value) {
            addCriterion("spencerWord =", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordNotEqualTo(String value) {
            addCriterion("spencerWord <>", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordGreaterThan(String value) {
            addCriterion("spencerWord >", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordGreaterThanOrEqualTo(String value) {
            addCriterion("spencerWord >=", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordLessThan(String value) {
            addCriterion("spencerWord <", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordLessThanOrEqualTo(String value) {
            addCriterion("spencerWord <=", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordLike(String value) {
            addCriterion("spencerWord like", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordNotLike(String value) {
            addCriterion("spencerWord not like", value, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordIn(List<String> values) {
            addCriterion("spencerWord in", values, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordNotIn(List<String> values) {
            addCriterion("spencerWord not in", values, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordBetween(String value1, String value2) {
            addCriterion("spencerWord between", value1, value2, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerWordNotBetween(String value1, String value2) {
            addCriterion("spencerWord not between", value1, value2, "spencerWord");
            return (Criteria) this;
        }

        public Criteria andSpencerNameIsNull() {
            addCriterion("spencerName is null");
            return (Criteria) this;
        }

        public Criteria andSpencerNameIsNotNull() {
            addCriterion("spencerName is not null");
            return (Criteria) this;
        }

        public Criteria andSpencerNameEqualTo(String value) {
            addCriterion("spencerName =", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameNotEqualTo(String value) {
            addCriterion("spencerName <>", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameGreaterThan(String value) {
            addCriterion("spencerName >", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameGreaterThanOrEqualTo(String value) {
            addCriterion("spencerName >=", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameLessThan(String value) {
            addCriterion("spencerName <", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameLessThanOrEqualTo(String value) {
            addCriterion("spencerName <=", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameLike(String value) {
            addCriterion("spencerName like", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameNotLike(String value) {
            addCriterion("spencerName not like", value, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameIn(List<String> values) {
            addCriterion("spencerName in", values, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameNotIn(List<String> values) {
            addCriterion("spencerName not in", values, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameBetween(String value1, String value2) {
            addCriterion("spencerName between", value1, value2, "spencerName");
            return (Criteria) this;
        }

        public Criteria andSpencerNameNotBetween(String value1, String value2) {
            addCriterion("spencerName not between", value1, value2, "spencerName");
            return (Criteria) this;
        }

        public Criteria andLocationIsNull() {
            addCriterion("location is null");
            return (Criteria) this;
        }

        public Criteria andLocationIsNotNull() {
            addCriterion("location is not null");
            return (Criteria) this;
        }

        public Criteria andLocationEqualTo(String value) {
            addCriterion("location =", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationNotEqualTo(String value) {
            addCriterion("location <>", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationGreaterThan(String value) {
            addCriterion("location >", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationGreaterThanOrEqualTo(String value) {
            addCriterion("location >=", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationLessThan(String value) {
            addCriterion("location <", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationLessThanOrEqualTo(String value) {
            addCriterion("location <=", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationLike(String value) {
            addCriterion("location like", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationNotLike(String value) {
            addCriterion("location not like", value, "location");
            return (Criteria) this;
        }

        public Criteria andLocationIn(List<String> values) {
            addCriterion("location in", values, "location");
            return (Criteria) this;
        }

        public Criteria andLocationNotIn(List<String> values) {
            addCriterion("location not in", values, "location");
            return (Criteria) this;
        }

        public Criteria andLocationBetween(String value1, String value2) {
            addCriterion("location between", value1, value2, "location");
            return (Criteria) this;
        }

        public Criteria andLocationNotBetween(String value1, String value2) {
            addCriterion("location not between", value1, value2, "location");
            return (Criteria) this;
        }

        public Criteria andUserNameIsNull() {
            addCriterion("userName is null");
            return (Criteria) this;
        }

        public Criteria andUserNameIsNotNull() {
            addCriterion("userName is not null");
            return (Criteria) this;
        }

        public Criteria andUserNameEqualTo(String value) {
            addCriterion("userName =", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotEqualTo(String value) {
            addCriterion("userName <>", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameGreaterThan(String value) {
            addCriterion("userName >", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameGreaterThanOrEqualTo(String value) {
            addCriterion("userName >=", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameLessThan(String value) {
            addCriterion("userName <", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameLessThanOrEqualTo(String value) {
            addCriterion("userName <=", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameLike(String value) {
            addCriterion("userName like", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotLike(String value) {
            addCriterion("userName not like", value, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameIn(List<String> values) {
            addCriterion("userName in", values, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotIn(List<String> values) {
            addCriterion("userName not in", values, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameBetween(String value1, String value2) {
            addCriterion("userName between", value1, value2, "userName");
            return (Criteria) this;
        }

        public Criteria andUserNameNotBetween(String value1, String value2) {
            addCriterion("userName not between", value1, value2, "userName");
            return (Criteria) this;
        }

        public Criteria andPhoneIsNull() {
            addCriterion("phone is null");
            return (Criteria) this;
        }

        public Criteria andPhoneIsNotNull() {
            addCriterion("phone is not null");
            return (Criteria) this;
        }

        public Criteria andPhoneEqualTo(String value) {
            addCriterion("phone =", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotEqualTo(String value) {
            addCriterion("phone <>", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneGreaterThan(String value) {
            addCriterion("phone >", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneGreaterThanOrEqualTo(String value) {
            addCriterion("phone >=", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneLessThan(String value) {
            addCriterion("phone <", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneLessThanOrEqualTo(String value) {
            addCriterion("phone <=", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneLike(String value) {
            addCriterion("phone like", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotLike(String value) {
            addCriterion("phone not like", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneIn(List<String> values) {
            addCriterion("phone in", values, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotIn(List<String> values) {
            addCriterion("phone not in", values, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneBetween(String value1, String value2) {
            addCriterion("phone between", value1, value2, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotBetween(String value1, String value2) {
            addCriterion("phone not between", value1, value2, "phone");
            return (Criteria) this;
        }

        public Criteria andStateIsNull() {
            addCriterion("state is null");
            return (Criteria) this;
        }

        public Criteria andStateIsNotNull() {
            addCriterion("state is not null");
            return (Criteria) this;
        }

        public Criteria andStateEqualTo(Integer value) {
            addCriterion("state =", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotEqualTo(Integer value) {
            addCriterion("state <>", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateGreaterThan(Integer value) {
            addCriterion("state >", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("state >=", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateLessThan(Integer value) {
            addCriterion("state <", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateLessThanOrEqualTo(Integer value) {
            addCriterion("state <=", value, "state");
            return (Criteria) this;
        }

        public Criteria andStateIn(List<Integer> values) {
            addCriterion("state in", values, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotIn(List<Integer> values) {
            addCriterion("state not in", values, "state");
            return (Criteria) this;
        }

        public Criteria andStateBetween(Integer value1, Integer value2) {
            addCriterion("state between", value1, value2, "state");
            return (Criteria) this;
        }

        public Criteria andStateNotBetween(Integer value1, Integer value2) {
            addCriterion("state not between", value1, value2, "state");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("createTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("createTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterionForJDBCDate("createTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("createTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("createTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("createTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterionForJDBCDate("createTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("createTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterionForJDBCDate("createTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("createTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("createTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("createTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andPictureIsNull() {
            addCriterion("picture is null");
            return (Criteria) this;
        }

        public Criteria andPictureIsNotNull() {
            addCriterion("picture is not null");
            return (Criteria) this;
        }

        public Criteria andPictureEqualTo(String value) {
            addCriterion("picture =", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureNotEqualTo(String value) {
            addCriterion("picture <>", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureGreaterThan(String value) {
            addCriterion("picture >", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureGreaterThanOrEqualTo(String value) {
            addCriterion("picture >=", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureLessThan(String value) {
            addCriterion("picture <", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureLessThanOrEqualTo(String value) {
            addCriterion("picture <=", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureLike(String value) {
            addCriterion("picture like", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureNotLike(String value) {
            addCriterion("picture not like", value, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureIn(List<String> values) {
            addCriterion("picture in", values, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureNotIn(List<String> values) {
            addCriterion("picture not in", values, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureBetween(String value1, String value2) {
            addCriterion("picture between", value1, value2, "picture");
            return (Criteria) this;
        }

        public Criteria andPictureNotBetween(String value1, String value2) {
            addCriterion("picture not between", value1, value2, "picture");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}